{% extends "maps/map_base.html" %}
{% load i18n %}
{% load staticfiles %}

{% block title %} {% trans "Explore Maps" %} - {{ block.super }} {% endblock %}

{% block body_class %}maps explore{% endblock %}

{% block body %}
  <div class="page-header">
    {% if user.is_authenticated and not READ_ONLY_MODE %}
      <a href="{% url "new_map" %}" class="btn btn-primary pull-right">{% trans "Create a New Map" %}</a>
    {% endif %}
    <h2>{% trans "Explore Maps" %}</h2>
  </div>
  {% include "search/_search_content.html" %}
{% endblock %}

{% block extra_script %}
{{ block.super }}
  <script type="text/javascript">
      {% if HAYSTACK_SEARCH %}
          SEARCH_URL = '{% url 'api_get_search' api_name='api' resource_name='base' %}?type__in=map'
      {% else %}
          SEARCH_URL = '{% url 'api_dispatch_list' api_name='api' resource_name='maps' %}';
      {% endif %}
      FILTER_TYPE = 'map';
  </script>
  {% with include_spatial='true' %}
    {% include 'search/search_scripts.html' %}
  {% endwith %}
{% endblock extra_script %}
